package com.springdoor.common.core.domain.entity;

import java.util.ArrayList;
import java.util.List;
import com.springdoor.common.annotation.Excel;
import com.springdoor.common.core.domain.BaseEntity;
import com.springdoor.common.core.domain.entity.SprdGoodsAttrVal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 商品属性对象 sprd_goods_attr
 *
 * @author llshs
 * @date 2024-05-10
 */
public class SprdGoodsAttr extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 属性id */
    private Long attrId;

    /** 父属性id */
    private Long parentId;

    /** 属性类型（a：属性,m：菜单） */
    private String attrType;

    /** 属性编码 */
    @Excel(name = "属性编码")
    private String attrCode;

    /** 属性名称 */
    @Excel(name = "属性名称")
    private String attrName;

    /** 属性值类型（0：文本,1：数字） */
    @Excel(name = "属性值类型", readConverterExp = "0=：文本,1：数字")
    private String valueType;

    /** 属性值单位 */
    @Excel(name = "属性值单位")
    private String valueUnit;

    /** 属性值是否多选（N：单选,Y：多选） */
    @Excel(name = "属性值是否多选", readConverterExp = "N=：单选,Y：多选")
    private String valueRadio;

    /** 状态（0代表存在 1代表删除） */
    @Excel(name = "状态", readConverterExp = "0=代表存在,1=代表删除")
    private String delFlag;

    /** 子菜单 */
    private List<SprdGoodsAttr> children = new ArrayList<SprdGoodsAttr>();

    /** 商品属性值信息 */
    private List<SprdGoodsAttrVal> sprdGoodsAttrValList = new ArrayList<>();

    public void setAttrId(Long attrId)
    {
        this.attrId = attrId;
    }

    public Long getAttrId()
    {
        return attrId;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public void setAttrType(String attrType)
    {
        this.attrType = attrType;
    }

    public String getAttrType()
    {
        return attrType;
    }
    public void setAttrCode(String attrCode)
    {
        this.attrCode = attrCode;
    }

    public String getAttrCode()
    {
        return attrCode;
    }
    public void setAttrName(String attrName)
    {
        this.attrName = attrName;
    }

    public String getAttrName()
    {
        return attrName;
    }
    public void setValueType(String valueType)
    {
        this.valueType = valueType;
    }

    public String getValueType()
    {
        return valueType;
    }
    public void setValueUnit(String valueUnit)
    {
        this.valueUnit = valueUnit;
    }

    public String getValueUnit()
    {
        return valueUnit;
    }
    public void setValueRadio(String valueRadio)
    {
        this.valueRadio = valueRadio;
    }

    public String getValueRadio()
    {
        return valueRadio;
    }
    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    public List<SprdGoodsAttr> getChildren() {
        return children;
    }

    public void setChildren(List<SprdGoodsAttr> children) {
        this.children = children;
    }

    public List<SprdGoodsAttrVal> getSprdGoodsAttrValList()
    {
        return sprdGoodsAttrValList;
    }

    public void setSprdGoodsAttrValList(List<SprdGoodsAttrVal> sprdGoodsAttrValList)
    {
        this.sprdGoodsAttrValList = sprdGoodsAttrValList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("attrId", getAttrId())
                .append("parentId", getParentId())
                .append("attrType", getAttrType())
                .append("attrCode", getAttrCode())
                .append("attrName", getAttrName())
                .append("valueType", getValueType())
                .append("valueUnit", getValueUnit())
                .append("valueRadio", getValueRadio())
                .append("delFlag", getDelFlag())
                .append("remark", getRemark())
                .append("sprdGoodsAttrValList", getSprdGoodsAttrValList())
                .toString();
    }
}
